﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Yala.Core.Authentication;
using System.Dynamic;

namespace Yala.UnitTests.FakeDependencies.Authentication {
    public class FakeMembership : IMembership {
        public dynamic ValidateUser(string serviceUrl) {
            dynamic result = new ExpandoObject();
            if (serviceUrl.Contains("badServiceUrl")) {
                result.Authenticated = false;
            } else {
                result.Authenticated = true;
                result.Email = "foo@google.com";
                result.ClaimId = "https://www.google.com/accounts/o8/id?id=foo";
            }
            return result;
        }

        public dynamic ValidateUser(string username, string password) {
            throw new NotImplementedException();
        }
    }
}
